import request from '@/utils/request'

//查询主机列表
export function getAllList(query) {
  return request({
    url: '/ipList/getHostList',
    method: 'get',
    params: query
  })
}

export function getList(query) {
  return request({
    url: '/ipList/getAllHostMonitorInfo',
    method: 'get',
    params: query
  })
}

//强制刷新主机列表
export function getListRefresh(query) {
  return request({
    url: '/ipList/getAllByForceFlush',
    method: 'get',
    params: query
  })
}

//添加备注
export function setRemark(query) {
  return request({
    url: '/ipList/updateInfoRemarkById',
    method: 'get',
    params: query
  })
}

//连接主机
export function connectHost(data) {
  return request({
    url: '/ipList/ipConnect',
    method: 'post',
    data: data
  })
}

//断开主机
export function disconnectHost(query) {
  return request({
    url: '/ipList/ipDisconnect',
    method: 'get',
    params: query
  })
}

//搜索主机
export function searchHost(query) {
  return request({
    url: '/ipList/getHostMonitorInfoByIp',
    method: 'get',
    params: query
  })
}

//搜索主机
export function getHostListByIp(query) {
  return request({
    url: '/ipList/getHostListByIp',
    method: 'get',
    params: query
  })
}

//安装主机
export function installHost(query) {
  return request({
    url: '/ipList/install',
    method: 'get',
    params: query
  })
}

//卸载主机
export function unloadHost(query) {
  return request({
    url: '/ipList/unload',
    method: 'get',
    params: query
  })
}